<template>
    <div>
        <el-form :model="form" label-width="100px">
            <el-form-item label="价格">
                <el-input v-model="form.price" style="width: 250px"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="submit">提交</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                form: {
                    price: 0
                },
                row: {}
            }
        },
        methods: {
            init(row,field) {
                this.row = row
                this.form.price = row[field]
            },
            submit() {
                this.$emit('submit', this.form.price,this.row)
            }
        }
    }
</script>

<style scoped>

</style>
